<template>
  <div class="p-0 pl-5 text-5 relative w-full">
    <!-- 两栏布局 -->
      <Section2col :current="current"></Section2col>
    <!-- 一栏布局 -->

      <Section1col :current="current"></Section1col>
  </div>
</template>


<script setup lang="ts">
import {
  NSplit,
  NIcon,
  NEquation,
  NButton,
  NModal,
  NScrollbar,
} from "naive-ui";

import { useAppStore, useUserStore } from "@/store";
import { ref, computed, onMounted } from "vue";
import Calculator from "@/components/Calculator.vue";
import Section1col from "./section1col.vue";
import Section2col from "./section2col.vue";
import { useRouter } from "vue-router";
import md from "@/markdownConfig"; // 引入markdown-it配置

const router = useRouter();

const showCalculator = ref(false);
const type = ref<"two-column" | "single-column">("two-column");

const equation = "\\displaystyle= \\frac{k(k+1)}{2}+k+1";

const userStore = useUserStore();
const appStore = useAppStore();

const contStyle = computed(() => {
  let height = {};
  if (appStore.sectionHeaderShow) {
    height = {
      maxHeight: "calc(100vh - 160px)",
    };
  } else {
    height = {
      maxHeight: "calc(100vh - 80px)",
    };
  }
  console.log("style:", height);
  return height;
});
const markdata = {
  category: "Data Analysis",
  type: "choices",
  main: "### Question 3\n\nThe scatterplot shows the relationship between two variables, $x$ and $y$. A line of best fit is also shown.\n\nWhich of the following equations best represents the line of best fit shown?",
  options: [
    "a. $y = 13.5 + 0.8x$",
    "b. $y = 13.5 - 0.8x$",
    "c. $y = -13.5 + 0.8x$",
    "d. $y = -13.5 - 0.8x$",
  ],
};

const markdownContent = ref(
  "## Title\nThis is a piece of Markdown content that contains mathematical form：\\(E = mc^2\\)"
);
const parsedMarkdown = ref("");
const leftData = ref("");
// 解析Markdown内容
parsedMarkdown.value = md.render(markdownContent.value);
leftData.value = md.render(markdata.main);

function spread() {}

const current = computed(() => {
  return userStore.testCurEx;
});

const gotoSignUp = () => {
  router.push("/login");
};

// onMounted(()=>{

// })
</script>